# -*- coding: utf-8 -*-
# File: demo_1.py
# Time: 2022/01/18 14:32:17
# Author: selfeasy
# Email: selfeasy@qq.com
# description: __new__ 、__init__魔术方法

class Demo(object):
    def __new__(cls, *args, **kwargs):
        print("this is new method")
    
    def __init__(self):
        print("this is init method")

if __name__ == "__main__":
    Demo()

'''out
this is new method 只调用了new，而没有调用init，原因是new方法未将类的实例返回
'''